package com.usian.config;

import com.alibaba.druid.pool.DruidDataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

//@Configuration
public class JdbcConfiguration2 {

   /* @Autowired
    private DbProperties dbProperties;*/

    @Bean
    public DruidDataSource dataSource2(DbProperties dbProperties){
        DruidDataSource dataSource2 = new DruidDataSource();
        dataSource2.setName(dbProperties.getName());
        dataSource2.setUrl(dbProperties.getUrl());
        return dataSource2;
    }

}
